#ifndef _ZENGL_RENDER_TARGET_H_
#define _ZENGL_RENDER_TARGET_H_

#include "zglEngine.h"
#include "zglConfig.h"
#include "sStretch.h"

namespace sgui
{
namespace engine
{
	
class zglRenderTarget: public sRenderTarget
{
private:
	zglPTexture			m_texture;
	zglPRenderTarget	m_target;
    zglEngine&			m_engine;
public:
	void draw(const math::sRectf& rect) const;
	void drawClip(const math::sRectf& rect, const math::sRectf& clipRect) const;

	void beginRender(sDrawStack& stack) const;
	void endRender(sDrawStack& stack) const;

	zglRenderTarget(zglEngine& engine, const math::sPointf& size);
	~zglRenderTarget();
};

};
};

#endif